<%@page import="hyl.base.flow.Track"%>
<%@page import="hyl.base.flow.Flow"%>
<%@page import="hyl.ext.base.MySession"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="hyl.core.db.MyDB,java.io.PrintWriter"%>
<%@ page import="java.util.List,java.util.Map,hyl.core.MyFun"%>
<%@ page import="com.servlet.*,com.alibaba.fastjson.*"%>
<%
PrintWriter shuchu = response.getWriter();
	String aname = request.getParameter("aname");
	String uphone = request.getParameter("uphone");
	String ualias = request.getParameter("ualias");
	String arr = request.getParameter("pic");
	String pic = "";
	if(arr!=null&&!arr.isEmpty()){
		JSONArray list = JSON.parseArray(arr);
		for(int i=0;i<list.size();i++){
	JSONObject jo = list.getJSONObject(i);
	if(jo.get("id").equals("avatar1")){
		pic=jo.get("path").toString();
	}
		}
	}
	String flowid = MyFun.getUUID();
	
	Flow model = My.get角色调整流程();
	Track trk = model.getTrkInstance(flowid);
	model.getLink("申请添加").run(trk);
	
	MyDB cdb = My.getCommitDB1();
	String sql = "insert into app(flowid,uid)values(?,?)";
	Object[] params = {};
	long oid = cdb.executeUpdate(sql, params);
	
	sql = "insert into org_act(id) value (?)";
	Object[] param2 = {oid};
	cdb.executeUpdate(sql, param2);
	cdb.commit();
	
	shuchu.print("success");
%>